Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add --port argument in flagd pods for set flagd service port #710

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kimsehwan96
Copy link
Contributor

This PR

  • Enhance argument injecting logic for set flagd service port (--port with FeatureFlagSoruce configuration)

Related Issues

Fixes #709

Notes

Follow-up Tasks

I don't have the background knowledge of why this feature wasn't implemented, and I haven't tested this code, so a thorough PR review is needed

How to test

Set FeatureFlagSource.spec.port with specific number and check the --port argument was properly set and check its debug log at info flag-evaluation/connect_service.go:227 Flag IResolver listening at: {PORT_NUMBER}

@kimsehwan96 kimsehwan96 requested a review from a team as a code owner October 4, 2024 05:21
@kimsehwan96 kimsehwan96 force-pushed the add-port-argument-in-flagd-pods branch from 3376172 to 07146d9 Compare October 4, 2024 05:27
@kimsehwan96 kimsehwan96 changed the title Add --port argument in flagd pods for set flagd service port fix: Add --port argument in flagd pods for set flagd service port Oct 4, 2024
Signed-off-by: kimsehwan96 <[email protected]>

Add missed mock Ports in flagdinjector_test.go getExpectedPod

Signed-off-by: kimsehwan96 <[email protected]>

Change wrong container port name port into flagd
@kimsehwan96 kimsehwan96 force-pushed the add-port-argument-in-flagd-pods branch from 07146d9 to c47d623 Compare October 4, 2024 05:47
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.10%. Comparing base (499661e) to head (df74af0).
Report is 24 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #710      +/-   ##
==========================================
+ Coverage   86.51%   87.10%   +0.58%     
==========================================
  Files          19       19              
  Lines        1587     1326     -261     
==========================================
- Hits         1373     1155     -218     
+ Misses        173      128      -45     
- Partials       41       43       +2     
Files with missing lines Coverage Δ
common/flagdinjector/flagdinjector.go 93.05% <100.00%> (+0.96%) ⬆️

... and 17 files with indirect coverage changes

Flag Coverage Δ
unit-tests 87.10% <100.00%> (+0.58%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Member

@beeme1mr beeme1mr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be set by the environment variable, but it looks like the "FLAGD" prefix is missing. I'm in favor of setting the CLI flags even more explicitly, but it would be good to understand why the environment variables aren't working properly.

@kimsehwan96
Copy link
Contributor Author

kimsehwan96 commented Oct 10, 2024

@beeme1mr
I agree. This work can't resolve this issue gracefully.
We need to fix why FLAGD prefix is missing in environment variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flagd serves flagd service with random port even if default port 8013 was set
2 participants